if (this.myPlugin === undefined) {
    this.myPlugin = {};
}

/**
 * 防抖函数，用于减少函数执行频率
 * @param {*} callback
 * @param {*} wait
 */
this.myPlugin.debounce = function (callback, wait) {
    var timer = null
    return function () {
        clearTimeout(timer)
        let args = arguments //接收这个函数的参数
        let that = args[args.length - 1]
        timer = setTimeout(function () {
            callback.call(that, args) //约定好参数与this
            clearTimeout(timer)
        }, wait)
    }
};